class Solution {
public:
    string cur;
    vector<string> v{"abc","def","ghi","jkl","mno","pqrs","tuv","wxyz"};
    vector<string> ret;
    int n=0;
    void dfs(string s,int u)
    {
    if(u==n)
    {
        ret.push_back(cur);
        return;
    }
    int num=s[u]-'2';
    for(int i=0;i<v[num].size();i++)
    {
        cur.push_back(v[num][i]);
        dfs(s,u+1);
        cur.pop_back();
    }
    }
    vector<string> letterCombinations(string digits) {
       
        n=digits.size();
        if(n==0) return {};
        dfs(digits,0);
        return ret;
    }
};